﻿@model iHouse.Model.Data.Book
@{
    ViewBag.Title = Resources.Book;
    Layout = "~/Views/Shared/_Root.cshtml";
}
<div class="logon-container">
    <h1>
        <span class="log-in">@Model.Name</span></h1>
    <div class="revbox">
        <div class="revleft">
            <span>@Resources.BookBy : @Model.Author</span> <span>@Resources.BookCategory : @Model.Category.Name</span>
        </div>
        <div class="revright">
            <span class="ratehead">@Resources.BookRateHeader</span>
            <div class="rateitem">
                <div class="rateit">
                    @Html.Hidden("score", this.Model.Score.HasValue ? this.Model.Score.Value : 0)
                </div>
            </div>
        </div>
        <div class="clear">
        </div>
    </div>
    <div class="section-left">
        <p>@Resources.BookPublisherDate : @Model.PublishDate.GetValueOrDefault().ToShortDateString()</p>
        <p>@Resources.BookPublisher : @Model.Publisher.Name</p>
        <p>@Resources.BookLanguage:
            @Enum.GetName(typeof(LanguageType), Model.Language)</p>
        <p>@Resources.BookType
            : @Enum.GetName(typeof(BookType), Model.Type)</p>
        <p>
            ISBN10 : @Model.ISBN10</p>
        <p>
            ISBN13 : @Model.ISBN13</p>
    </div>
    @if (!string.IsNullOrEmpty(Model.ImagePath))
    {
        <div class="revright">
            @Html.Image(Model.ImagePath, new { @class = "bookimg" })
        </div>
    }
    <div class="clear">
    </div>
</div>
<script type="text/javascript">
    Sys.require(["BookUI", "rateit"], function () { InitRateit(true); });
</script>
